package com.easyidea.its.domain.service.surveillance.impl;

import java.util.List;

import com.easyidea.its.domain.model.surveillance.VehicleInfo;
import com.easyidea.its.domain.repository.surveillance.VehicleInfoRepository;
import com.easyidea.its.domain.service.surveillance.VehicleInfoService;

public class VehicleInfoServiceImpl implements VehicleInfoService {
	private VehicleInfoRepository vehicleInfoRepository;
	
	public void setVehicleInfoRepository(VehicleInfoRepository vehicleInfoRepository) {
		this.vehicleInfoRepository = vehicleInfoRepository;
	}

	public VehicleInfo getVehicleInfo(String plateNumber) {
		// TODO Auto-generated method stub
		List<VehicleInfo> infos = vehicleInfoRepository.getVehicleInfo(plateNumber);
		if(infos != null && infos.size() >0) {
			return (VehicleInfo)infos.get(0);
		}
		return null;
	}

}
